Skip to content

Add SLSA Provenance and Release Steps - #814

Merged
jonobr1 merged 4 commits into
devfrom
797-ossf-copilot
Apr 23, 2026
Merged

Add SLSA Provenance and Release Steps#814
jonobr1 merged 4 commits into
devfrom
797-ossf-copilot

Conversation

@jonobr1

@jonobr1 jonobr1 commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Enable SLSA provenance attestation and attach provenance to releases and npm publishes. Update workflow permissions to include contents: write and attestations: write (keeping id-token: write) so the job can create releases and produce attestations. Make the build step explicit (remove --if-present), run actions/attest-build-provenance to generate an intoto provenance bundle for build/two.js, build/two.module.js and build/two.min.js, stage the bundle as an artifact, create a GitHub Release including the build artifacts and the provenance JSONL, and publish to npm with --provenance.

jonobr1 added 3 commits April 10, 2026 15:44
Add instructions to pin GitHub Actions to specific SHA hashes from jonobr1 forks to satisfy OpenSSF Scorecard pinned-dependencies requirements. The new doc includes a naming convention, a mapping table of common actions to pinned fork SHAs, guidance for pinning npm installs, and steps for adding new actions (including a TODO placeholder for forks). Applies to .github/workflows/**.
Replace forked/third-party action references with official action repositories for security and maintainability. Updated workflows to use actions/checkout, actions/setup-node, actions/cache, github/codeql-action, and ossf/scorecard-action and added inline version comments (e.g. # v5 / # v6 / # v4). Affected files: .github/workflows/codeql.yml, copilot-setup-steps.yml, lint.yml, publish.yml, and scorecard.yml. No behavioral changes beyond switching action sources and annotating versions.
Enable SLSA provenance attestation and attach provenance to releases and npm publishes. Update workflow permissions to include contents: write and attestations: write (keeping id-token: write) so the job can create releases and produce attestations. Make the build step explicit (remove --if-present), run actions/attest-build-provenance to generate an intoto provenance bundle for build/two.js, build/two.module.js and build/two.min.js, stage the bundle as an artifact, create a GitHub Release including the build artifacts and the provenance JSONL, and publish to npm with --provenance.
Copilot AI review requested due to automatic review settings April 13, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds release-time supply chain artifacts by generating SLSA provenance for built JS outputs and attaching them to GitHub releases / npm publishes, while also migrating several workflows from jonobr1/* action forks to upstream actions.

Changes:

  • Update multiple workflows to use upstream GitHub/OSSF actions instead of jonobr1/* forks.
  • Enhance the publish workflow to build explicitly, generate SLSA provenance attestation, create a GitHub Release with artifacts + provenance, and publish to npm with --provenance.
  • Adjust publish workflow permissions to allow attestations and release creation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/scorecard.yml Switches to upstream actions/checkout, ossf/scorecard-action, and github/codeql-action/upload-sarif.
.github/workflows/publish.yml Adds SLSA provenance attestation + GitHub Release creation + npm publish provenance, and updates permissions.
.github/workflows/lint.yml Switches checkout action reference (but currently breaks YAML structure).
.github/workflows/copilot-setup-steps.yml Switches checkout/setup-node action references to upstream.
.github/workflows/codeql.yml Switches checkout/setup-node/cache/codeql-action references to upstream.
Comments suppressed due to low confidence (1)

.github/workflows/lint.yml:15

  • The steps list items are not indented under steps: (e.g., - uses, - name, run). As written, this YAML will not parse as a valid GitHub Actions workflow. Indent each step by two additional spaces so the list is a child of steps:.
    steps:
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  # v5
    - name: Install modules
      run: npm install
    - name: Run ESLint
      run: npm run lint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml
@codacy-production

codacy-production Bot commented Apr 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback

Add a step to upload the generated provenance bundle as a GitHub Actions artifact and run `npm publish --provenance` earlier in the workflow. The upload-artifact action is pinned to a specific commit (v4.6.2) and names the artifact `provenance-bundle-${{ github.ref_name }}` using the produced `two.js-${{ github.ref_name }}.intoto.jsonl` file. Remove the duplicate `npm publish --provenance` step at the end of the job.
@jonobr1
jonobr1 merged commit 6ad9725 into dev Apr 23, 2026
4 checks passed
@jonobr1
jonobr1 deleted the 797-ossf-copilot branch April 23, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants